package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.AccountLogMapper;
import com.aidex.biz.domain.AccountLog;
import com.aidex.biz.service.AccountLogService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 账户交易信息Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-04-03
 */
@Service
@Transactional(readOnly = true)
public class AccountLogServiceImpl extends BaseServiceImpl<AccountLogMapper, AccountLog> implements AccountLogService
{
    private static final Logger log = LoggerFactory.getLogger(AccountLogServiceImpl.class);

    /**
     * 获取单条数据
     * @param accountLog 账户交易信息
     * @return 账户交易信息
     */
    @Override
    public AccountLog get(AccountLog accountLog)
    {
        AccountLog dto = super.get(accountLog);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 账户交易信息id
     * @return 账户交易信息
     */
    @Override
    public AccountLog get(String id)
    {
        AccountLog dto = super.get(id);
        return dto;
    }


    /**
     * 查询账户交易信息列表
     * @param accountLog 账户交易信息
     * @return 账户交易信息
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<AccountLog> findList(AccountLog accountLog)
    {
        return super.findList(accountLog);
    }

    /**
     * 分页查询账户交易信息列表
     * @param accountLog 账户交易信息
     * @return 账户交易信息
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<AccountLog> findPage(AccountLog accountLog)
    {
        return super.findPage(accountLog);
    }

    /**
     * 保存账户交易信息
     * @param accountLog
     * @return 结果
     */
    @Override
    public boolean save(AccountLog accountLog)
    {
        return super.save(accountLog);
    }


    /**
     * 删除账户交易信息信息
     * @param accountLog
     * @return 结果
     */
    @Override
    public boolean remove(AccountLog accountLog)
    {
        return super.remove(accountLog);
    }

    /**
     * 批量删除账户交易信息
     * @param ids 需要删除的账户交易信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteAccountLogByIds(String[] ids)
    {
        return mapper.deleteAccountLogByIds(ids);
    }

    /**
     * 获取最大编号
     * @param accountLog 账户交易信息
     * @return 结果
     */
    @Override
    public int findMaxSort(AccountLog accountLog)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(accountLog));
    }
}
